import logging

import yagmail


def log_set():
    logging.basicConfig(level=logging.DEBUG,format="%(message)s",handlers=[
        logging.StreamHandler(),
        logging.FileHandler("log.txt")
    ])
def send_mail(filpath):
    mail=yagmail.SMTP(user="1105906242@qq.com",password="khkiysvitfdzjjjf",host="smtp.qq.com",encoding="utf8")
    mail.send(to="1105906242@qq.com",subject="a3mall接口测试报告",contents="a3mall接口测试报告",attachments=filpath)